#include "syncmessage.h"

SyncMessage::SyncMessage(int pType) {
	mMsgBuf = new tMsgBuf;
	//mType = MSG_TYPE;
	mType = pType;
	mMsgBuf->type = mType;
}

SyncMessage::~SyncMessage() {
	delete mMsgBuf;
}

int SyncMessage::getLength() {
	return MSG_LENGTH;
}

void* SyncMessage::getBuffer() {
	return this->mMsgBuf;
}

void SyncMessage::setBuffer(void* pBuffer , int pSize) {
	delete mMsgBuf;
	mMsgBuf = new tMsgBuf;
	memcpy(mMsgBuf , pBuffer , pSize);
}

long SyncMessage::getMessageType() {
	return mType;
}
